package com.szeldon.pj.jps.qres;

import java.util.Stack;
import java.util.logging.Logger;

public class QResStack {

	private static final Logger logger = Logger.getLogger(QResStack.class.getName());

	private Stack<AbstractQueryResult> stack = new Stack<AbstractQueryResult>();

	public QResStack() {

	}

	public AbstractQueryResult pop() {
		AbstractQueryResult result = stack.pop();
		logger.info("QRES.pop(" + result + ")");
		return result;
	}

	public void push(AbstractQueryResult result) {
		logger.info("QRES.push(" + result + ")");
		stack.push(result);
	}

	public int getSize() {
		return stack.size();
	}

}
